package com.w7vm.menuweb.utility;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class PropertiesLoader {

	private Properties props;  
    private String nomeDoProperties = "/messages.properties";  
  
    protected PropertiesLoader(){  
            props = new Properties();  
            InputStream in = this.getClass().getResourceAsStream(nomeDoProperties);  
            try{  
        			System.out.println("Valor Properties IN: "+ in);
        			props.load(in);  
            		System.out.println("Valor Properties PROPS: "+ props);
                    in.close();  
            }  
            catch(IOException e){e.printStackTrace();}  
    }  
  
    protected String getValor(String chave){  
            return (String)props.getProperty(chave);  
    }  
    
}
